Optimal. Leaf size=273 \[ -\frac {2 \left (a^2-b^2\right ) (2 A b-5 a B) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{15 a^2 d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (2 A b^2-5 a b B-3 a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{15 a^2 d \sqrt {\frac {b+a \cos (c+d x)}{a+b}}}+\frac {2 (A b+5 a B) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{15 a d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.65, antiderivative size = 273, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 10, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4350, 4179,
4189, 4120, 3941, 2734, 2732, 3943, 2742, 2740} \begin {gather*} -\frac {2 \sqrt {\cos (c+d x)} \left (-3 a^2 (3 A+5 C)-5 a b B+2 A b^2\right ) \sqrt {a+b \sec (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{15 a^2 d \sqrt {\frac {a \cos (c+d x)+b}{a+b}}}-\frac {2 \left (a^2-b^2\right ) (2 A b-5 a B) \sqrt {\frac {a \cos (c+d x)+b}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{15 a^2 d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}+\frac {2 (5 a B+A b) \sin (c+d x) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}{15 a d}+\frac {2 A \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)}}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 3941
Rule 3943
Rule 4120
Rule 4179
Rule 4189
Rule 4350
Rubi steps
\begin {align*} \int \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{5 d}+\frac {1}{5} \left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {1}{2} (A b+5 a B)+\frac {1}{2} (3 a A+5 b B+5 a C) \sec (c+d x)+\frac {1}{2} b (2 A+5 C) \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {2 (A b+5 a B) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{15 a d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{5 d}-\frac {\left (4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {1}{4} \left (2 A b^2-5 a b B-3 a^2 (3 A+5 C)\right )-\frac {1}{4} a (7 A b+5 a B+15 b C) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+b \sec (c+d x)}} \, dx}{15 a}\\ &=\frac {2 (A b+5 a B) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{15 a d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{5 d}-\frac {\left (\left (a^2-b^2\right ) (2 A b-5 a B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+b \sec (c+d x)}} \, dx}{15 a^2}-\frac {\left (\left (2 A b^2-5 a b B-3 a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx}{15 a^2}\\ &=\frac {2 (A b+5 a B) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{15 a d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{5 d}-\frac {\left (\left (a^2-b^2\right ) (2 A b-5 a B) \sqrt {b+a \cos (c+d x)}\right ) \int \frac {1}{\sqrt {b+a \cos (c+d x)}} \, dx}{15 a^2 \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (2 A b^2-5 a b B-3 a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {b+a \cos (c+d x)} \, dx}{15 a^2 \sqrt {b+a \cos (c+d x)}}\\ &=\frac {2 (A b+5 a B) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{15 a d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{5 d}-\frac {\left (\left (a^2-b^2\right ) (2 A b-5 a B) \sqrt {\frac {b+a \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}}} \, dx}{15 a^2 \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (2 A b^2-5 a b B-3 a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}} \, dx}{15 a^2 \sqrt {\frac {b+a \cos (c+d x)}{a+b}}}\\ &=-\frac {2 \left (a^2-b^2\right ) (2 A b-5 a B) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{15 a^2 d \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (2 A b^2-5 a b B-3 a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{15 a^2 d \sqrt {\frac {b+a \cos (c+d x)}{a+b}}}+\frac {2 (A b+5 a B) \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{15 a d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 17.71, size = 404, normalized size = 1.48 \begin {gather*} \frac {\sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \left (\frac {2 (A b+5 a B) \sin (c+d x)}{15 a}+\frac {1}{5} A \sin (2 (c+d x))\right )}{d}-\frac {2 \cos ^{\frac {3}{2}}(c+d x) \left (\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)\right )^{3/2} \sqrt {a+b \sec (c+d x)} \left (-i (a+b) \left (-2 A b^2+5 a b B+3 a^2 (3 A+5 C)\right ) E\left (i \sinh ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {-a+b}{a+b}\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+i a (a+b) (9 a A-2 A b+5 a (B+3 C)) F\left (i \sinh ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {-a+b}{a+b}\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-\left (-2 A b^2+5 a b B+3 a^2 (3 A+5 C)\right ) (b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )^{3/2} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{15 a^2 d (b+a \cos (c+d x)) \sqrt {\sec (c+d x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1965\) vs.
\(2(303)=606\).
time = 0.29, size = 1966, normalized size = 7.20
method | result | size |
default | \(\text {Expression too large to display}\) | \(1966\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.69, size = 529, normalized size = 1.94 \begin {gather*} \frac {6 \, {\left (3 \, A a^{3} \cos \left (d x + c\right ) + 5 \, B a^{3} + A a^{2} b\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + \sqrt {2} {\left (-15 i \, B a^{3} - 3 i \, {\left (A + 5 \, C\right )} a^{2} b + 10 i \, B a b^{2} - 4 i \, A b^{3}\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) + \sqrt {2} {\left (15 i \, B a^{3} + 3 i \, {\left (A + 5 \, C\right )} a^{2} b - 10 i \, B a b^{2} + 4 i \, A b^{3}\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) - 3 \, \sqrt {2} {\left (-3 i \, {\left (3 \, A + 5 \, C\right )} a^{3} - 5 i \, B a^{2} b + 2 i \, A a b^{2}\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right ) - 3 \, \sqrt {2} {\left (3 i \, {\left (3 \, A + 5 \, C\right )} a^{3} + 5 i \, B a^{2} b - 2 i \, A a b^{2}\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right )}{45 \, a^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________